package nancal.mp.db.mongo.entity.admin

import nbcp.base.db.IdNamePath
import nbcp.base.db.annotation.Cn
import nbcp.base.db.annotation.DbEntityGroup
import nbcp.base.model.BaseMarkEntity
import org.springframework.data.mongodb.core.mapping.Document

@Cn("后台角色")
@Document
@DbEntityGroup("admin")
data class AdminRole(
    @Cn("角色名称")
        var name: String = "",

    @Cn("允许的Api")
        var permissionApis: MutableList<IdNamePath> = mutableListOf(), //关联 AdminPermissionApi

    @Cn("授权的菜单")
        var menus: MutableList<IdNamePath> = mutableListOf(),

    @Cn("允许的页面按钮权限")
        var pageActions: MutableList<AdminPermissionPageAction> = mutableListOf() // key=页面path,value=ans
) : BaseMarkEntity()